package com.wzy.peopleManagement.commond
{
	import com.adobe.cairngorm.commands.ICommand;
	import com.adobe.cairngorm.control.CairngormEvent;
	import com.wzy.peopleManagement.business.UserDeledate;
	import com.wzy.peopleManagement.event.LoadUserByIdEvent;
	
	import mx.rpc.IResponder;

	public class LoadUserByIdCommond implements IResponder, ICommand
	{
		private var tw : * ;
		public function LoadUserByIdCommond()
		{
		}

		public function result(data:Object):void
		{
			var objTemp : Object = Object(data.result);
			tw.loadUserById(objTemp);
		}
		
		public function fault(info:Object):void
		{
		}
		
		public function execute(event:CairngormEvent):void
		{
			var e : LoadUserByIdEvent = LoadUserByIdEvent(event);
			tw = e.vo.tw;
			var deleData : UserDeledate = new UserDeledate(this);
			deleData.loadUserById(e.vo.userId);
		}
	}
}